<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich">
  <head><title>Swiadectwa</title></head>
  <body>
<center>
<f:view >
	<a4j:form>
	<!-- <rich:panel style="width:50%;  margin-left: auto ;margin-right: auto"> 
					    <rich:comboBox selectFirstOnUpdate="true"
										listWidth="90" 
										value="#{comboDemoBean.backgroundColorItem}"										
					        			defaultLabel="Wybierz wydział" id="bgColorCombo">
					        <f:selectItems value="#{comboDemoBean.selectItems['Colors']}"  />
					    </rich:comboBox>
					</rich:panel> -->
		<rich:panel>
        <f:facet name="header"><h:outputText value="Login"/></f:facet>
        <center>
        <h:panelGrid columns="3" title="user" rowClasses="s1row" columnClasses="wfcol1,wfcol2,wfcol3">
        	<h:outputText value="Hasło" />
			<h:inputText value="#{rejestracja.haslo}" id="haslo" required="true"/>
			<rich:message for="haslo" />
			<h:outputText value="E-mail " />
			<h:inputText value="#{rejestracja.email}" id="email" required="true"/>
			<rich:message for="email" />
			<center>
				<h:commandButton id="loguj" action="#{rejestracja.loguj}" value="Loguj" />
			</center>
			<center>
			<h:commandButton  id="rejestruj_"  action="#{rejestracja.ss}" value="Nie posiadam konta" >
			<f:param name="action" value="delete" />
			</h:commandButton>
			<h:commandButton action="#{rejestracja.editAction}" >
    <f:setPropertyActionListener target="#{rejestracja.action}" value="delete" />
</h:commandButton>
		</center>
		</h:panelGrid>
		</center>
    	</rich:panel>
	</a4j:form>
</f:view>
    <a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel1')}.show()" 
reRender="panel1" />
    <rich:modalPanel id="panel1" width="350" height="100"
 showWhenRendered="#{rejestracja.mp.wynik}">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="#{rejestracja.mp.naglowek}"></h:outputText>
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
            	<h:commandButton   id="hidelink1" value="X"/>
                <rich:componentControl for="panel1" attachTo="hidelink1" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
        <h:outputText value="#{rejestracja.mp.tresc}"></h:outputText>
    </rich:modalPanel>
<!-- ddddddd -->
<h:form>
<h:panelGrid columns="3" columnClasses="gridContent">
			<!-- pierwsza grupa paneli -->
            <rich:panel id="controls" style="height:200px;">
            <h:outputText value="Aby wprowadzić oceny,zaznacz na liście osoby i przenieść do drugiej listy po prawej stronie"/>
			<rich:pickList 
				switchByClick="false"
				valueChangeListener="#{listaoceny.change_}"
				value="#{listaoceny.listValues}"
				copyAllControlLabel = "Przenieś wszystko" 
				copyControlLabel = "Przenieś" 
            	removeControlLabel = "Zwróć wszystko" 
            	removeAllControlLabel ="Zwróć"
            	onlistchanged="sendAjax();"> 
				<f:selectItems value="#{listaoceny.studentbezoceny}"/>
			</rich:pickList>
			<a4j:jsFunction name="sendAjax" reRender="selection"/>
			</rich:panel>
			<!-- koniec -->
			<!-- druga grupa paneli -->
			<rich:panel id="controls21" style="width:400px;height:200px;">
			<f:facet name="header">
                    <h:outputText value="Zaznacz ocenę" />
            </f:facet>
            
            <h:panelGrid columns="2">
			<h:selectOneRadio value="#{listaoceny.favColor2}" layout="pageDirection" >
						<a4j:support event="onclick" action="#{listaoceny.doSomething}"/>
                        <f:selectItems value="#{listaoceny.favColor2Value}" />
            </h:selectOneRadio>
            <h:inputTextarea  id="editorvalue2" value="#{listaoceny.value}"
                        style="width:200px;height:50px;background-color:#{listaoceny.kolor};" rows="10"  />
            </h:panelGrid>
            </rich:panel>
            <!-- koniec -->
            
</h:panelGrid>
</h:form></center>
     </body>
</html>

